package top.superflow.core.statis.imp

import top.superflow.core.statis.Metrizable
import top.superflow.core.utils.PojoUtils

import scala.collection.Map

class MapStatistics private(param : Map[String, Any]) extends Metrizable[Map[String, Any]]{
  val map = param

  def getMetrics : Map[String, Any] = {
    this.map
  }

}

object MapStatistics{

  def getStatistics(pojo : Any) : MapStatistics = {

    val map = PojoUtils.collectGetterToMap(pojo)

    val mapStatistics = new MapStatistics(map)

    mapStatistics
  }
}